home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
...taking it to the Macs!
/
...taking it to the Macs!.iso
/
Extras
/
ActiveX Mac SDK
/
ActiveX SDK
/
Common
/
nocrt.cpp
< prev
next >
Wrap
Text File
|
1997-01-03
|
805b
|
51 lines
//
// NOCRT.CPP
//
// Copyright (C) Microsoft Corporation, 1996
//
// Replacement C runtime routines to avoid pulling in any unnecessary goo.
//
#include "config.h"
#define FAR
#include <ole2.h>
#include <dispatch.h>
#include <wintypes.h>
#include "debug.h"
#include "nocrt.h"
#define __cdecl
LPOLESTR OleStrdup(LPCOLESTR psz)
{
LPOLESTR pszDup;
if ((pszDup = (LPOLESTR) CoTaskMemAlloc(strlen((char *) psz) + 1)) != NULL)
strcpy((char *) pszDup, (const char *) psz);
return pszDup;
}
#ifdef ACTIVEX_CONTROL
void * __cdecl operator new(size_t nSize)
{
return CoTaskMemAlloc(nSize);
}
void __cdecl operator delete(void *pv)
{
CoTaskMemFree(pv);
}
int __cdecl _purecall(void);
int __cdecl _purecall(void)
{
#ifdef _DEBUG
Debugger();
#endif
return 0;
}
#endif